Newsgroups: alt.binaries.multimedia From: cvrij@cs.vu.nl (C. van Rij) Subject: Qt to MPEG Date: Sat, 20 Aug 1994 19:37:34 GMT Converting 24-bit QuickTime to MPEG + .wav To use this method you need these 2 packages: Xanim Package by Mark Podlipec. This program will play QuickTime and AVI files encoded with a number of different compression techniques. mpeg_encode >from Berkeley; This proves to be a flexible solution for encoding Video Only MPEG-streams, with varying frames sequence (I/P/B). -A diff which adds the -ppm, -raw, and -au options to xanim. It was written for xanim2.69.3, but seems to work on xanim2.69.6. -A diff which adds the -wait option to the Berkeley MPEG_Encoder; Written for version 1.3, no other versions tested. -mkwav, A small C-program to add a valid .wav (RIFF) header to raw audio-data. compile with: cc mkwav.c -o mkwav Using the patches If you're going to use these patches I suggest you try to compile the xanim and mpeg_encode first. MPEG_Encode shouldn't be any problem, xanim might be more difficult depending on the platform you're working on. If you're running one of the platforms where sound is supported, uncomment the relevant lines in the Imakefile. Once you have both programs compiled/working, apply the patches. You should now be able to use -ppm, -au, or -raw with xanim, and -wait with mpeg_encode. Conversion procedure. First set up the parameter file for MPEG_Encode. (Example file at end of this article) You should probably only change the OUTPUT and INPUT_DIR fields, and change the range specified as [0-2537] to whatever you need. INPUT_DIR should be the directory from where you'll start xanim. (which is also where the frames will be written.) Running xanim with -ppm and optionally +f should give you 10 ppm frames. This is a good time to check the quality with something like xv. If the picture doesn't look quite right, play the QuickTime file with the options +CF4 rather than -ppm. If this looks better, please inform me about the problem. You can then start mpeg_encode with -wait and the name of your parameter file specified; If the INPUT_DIR is set-up correctly, mpeg_encode will start reading the frames, and generating t (I am still looking for a 24-bit AVI file to test avi -> mpeg, btw) Note: xanim will wait for mpeg_encode to remove files before continuing, so no more than 10 frames will be present at one time. If you want to start with a frame other than 0, you'll have to remove the leading frames manually. Getting the sound If you are running xanim on a platform with sound support, you can specify either -raw or -au, other platforms only support -raw. -raw writes the sound as present in the quicktime file, -au attempts to convert it to regular .au format. Running xanim with this option will give you an xanim.{au|raw} file, and on stderr the SampleRate, SampleSize, and Number of Channels. You can use mkwav to turn the .au format into .wav (Uncompressed) Run mkwav like: mkwav xanim.raw tempest.wav this will prompt you for SampleRate, NrOfChannels, and SampleSize. If you do not specify an outputfile, mkwav will come-up with something, if you don't specify an inputfile, mkwav will prompt you for it. Enjoy! ============== diff file for xanim =========================== see xanim.diff ============= diff file for mpeg_encode ========================== see mpeg_encode.diff ================= code for mkwav ===================== see mkwav.diff ================= example parameter file ================== see example.par -- Casey Ryder Vrije Universiteit Amsterdam ++312503-16844 CET http://www.cs.vu.nl/~cvrij The MultiMedia Experience